package xhwl.insurance.upgrade;



/**
* 升级状态更新类
* @author lim
* @date 2017年2月9日
* @version 1.0
*/
public class UpgradeEvent {
    public static final int STATE_NEWEST=-1;
    public static final int STATE_INITIAL=0x00;
    public static final int STATE_START=0x01;
    public static final int STATE_DOWNLOADING=0x02;
    public static final int STATE_COMPLETE=0x03;
    public static final int STATE_FAILED=0x04;
    private int state=STATE_INITIAL;

    public UpgradeEvent(int state){
        this.state=state;
    }
    public boolean isDownloadComplete(){
        return state==STATE_COMPLETE;
    }
    public boolean isNewest(){
        return state==STATE_NEWEST;
    }
    public boolean isDownloading(){
        return state==STATE_DOWNLOADING;
    }
    public boolean isStartDownload(){
        return state==STATE_START;
    }
}
